Optimal. Leaf size=177 \[ -\frac {(a-5 b) \tanh ^{-1}\left (\frac {\sqrt {a} \sec (e+f x)}{\sqrt {a-b+b \sec ^2(e+f x)}}\right )}{2 a^{7/2} f}-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \left (a-b+b \sec ^2(e+f x)\right )^{3/2}}-\frac {5 b \sec (e+f x)}{6 a^2 f \left (a-b+b \sec ^2(e+f x)\right )^{3/2}}-\frac {(13 a-15 b) b \sec (e+f x)}{6 a^3 (a-b) f \sqrt {a-b+b \sec ^2(e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 177, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3745, 482, 541,
12, 385, 213} \begin {gather*} -\frac {(a-5 b) \tanh ^{-1}\left (\frac {\sqrt {a} \sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)-b}}\right )}{2 a^{7/2} f}-\frac {b (13 a-15 b) \sec (e+f x)}{6 a^3 f (a-b) \sqrt {a+b \sec ^2(e+f x)-b}}-\frac {5 b \sec (e+f x)}{6 a^2 f \left (a+b \sec ^2(e+f x)-b\right )^{3/2}}-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \left (a+b \sec ^2(e+f x)-b\right )^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 213
Rule 385
Rule 482
Rule 541
Rule 3745
Rubi steps
\begin {align*} \int \frac {\csc ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{5/2}} \, dx &=\frac {\text {Subst}\left (\int \frac {x^2}{\left (-1+x^2\right )^2 \left (a-b+b x^2\right )^{5/2}} \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \left (a-b+b \sec ^2(e+f x)\right )^{3/2}}+\frac {\text {Subst}\left (\int \frac {a-b-4 b x^2}{\left (-1+x^2\right ) \left (a-b+b x^2\right )^{5/2}} \, dx,x,\sec (e+f x)\right )}{2 a f}\\ &=-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \left (a-b+b \sec ^2(e+f x)\right )^{3/2}}-\frac {5 b \sec (e+f x)}{6 a^2 f \left (a-b+b \sec ^2(e+f x)\right )^{3/2}}+\frac {\text {Subst}\left (\int \frac {(3 a-5 b) (a-b)-10 (a-b) b x^2}{\left (-1+x^2\right ) \left (a-b+b x^2\right )^{3/2}} \, dx,x,\sec (e+f x)\right )}{6 a^2 (a-b) f}\\ &=-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \left (a-b+b \sec ^2(e+f x)\right )^{3/2}}-\frac {5 b \sec (e+f x)}{6 a^2 f \left (a-b+b \sec ^2(e+f x)\right )^{3/2}}-\frac {(13 a-15 b) b \sec (e+f x)}{6 a^3 (a-b) f \sqrt {a-b+b \sec ^2(e+f x)}}+\frac {\text {Subst}\left (\int \frac {3 (a-5 b) (a-b)^2}{\left (-1+x^2\right ) \sqrt {a-b+b x^2}} \, dx,x,\sec (e+f x)\right )}{6 a^3 (a-b)^2 f}\\ &=-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \left (a-b+b \sec ^2(e+f x)\right )^{3/2}}-\frac {5 b \sec (e+f x)}{6 a^2 f \left (a-b+b \sec ^2(e+f x)\right )^{3/2}}-\frac {(13 a-15 b) b \sec (e+f x)}{6 a^3 (a-b) f \sqrt {a-b+b \sec ^2(e+f x)}}+\frac {(a-5 b) \text {Subst}\left (\int \frac {1}{\left (-1+x^2\right ) \sqrt {a-b+b x^2}} \, dx,x,\sec (e+f x)\right )}{2 a^3 f}\\ &=-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \left (a-b+b \sec ^2(e+f x)\right )^{3/2}}-\frac {5 b \sec (e+f x)}{6 a^2 f \left (a-b+b \sec ^2(e+f x)\right )^{3/2}}-\frac {(13 a-15 b) b \sec (e+f x)}{6 a^3 (a-b) f \sqrt {a-b+b \sec ^2(e+f x)}}+\frac {(a-5 b) \text {Subst}\left (\int \frac {1}{-1+a x^2} \, dx,x,\frac {\sec (e+f x)}{\sqrt {a-b+b \sec ^2(e+f x)}}\right )}{2 a^3 f}\\ &=-\frac {(a-5 b) \tanh ^{-1}\left (\frac {\sqrt {a} \sec (e+f x)}{\sqrt {a-b+b \sec ^2(e+f x)}}\right )}{2 a^{7/2} f}-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \left (a-b+b \sec ^2(e+f x)\right )^{3/2}}-\frac {5 b \sec (e+f x)}{6 a^2 f \left (a-b+b \sec ^2(e+f x)\right )^{3/2}}-\frac {(13 a-15 b) b \sec (e+f x)}{6 a^3 (a-b) f \sqrt {a-b+b \sec ^2(e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(380\) vs. \(2(177)=354\).
time = 2.69, size = 380, normalized size = 2.15 \begin {gather*} \frac {\frac {\sqrt {\frac {a+b+(a-b) \cos (2 (e+f x))}{1+\cos (2 (e+f x))}} \left (8 a b^2 \cos (e+f x)-24 (a-b) b \cos (e+f x) (a+b+(a-b) \cos (2 (e+f x)))-3 (a-b) (a+b+(a-b) \cos (2 (e+f x)))^2 \cot (e+f x) \csc (e+f x)\right )}{3 a^3 (a-b) (a+b+(a-b) \cos (2 (e+f x)))^2}+\frac {(a-5 b) \cos (e+f x) \left (2 \tanh ^{-1}\left (\tan ^2\left (\frac {1}{2} (e+f x)\right )-\frac {\sqrt {4 b \tan ^2\left (\frac {1}{2} (e+f x)\right )+a \left (-1+\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )^2}}{\sqrt {a}}\right )+\log \left (a-2 b-a \tan ^2\left (\frac {1}{2} (e+f x)\right )+\sqrt {a} \sqrt {4 b \tan ^2\left (\frac {1}{2} (e+f x)\right )+a \left (-1+\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )^2}\right )\right ) \sec ^2\left (\frac {1}{2} (e+f x)\right ) \sqrt {(a+b+(a-b) \cos (2 (e+f x))) \sec ^2(e+f x)}}{2 a^{7/2} \sqrt {(a+b+(a-b) \cos (2 (e+f x))) \sec ^4\left (\frac {1}{2} (e+f x)\right )}}}{2 f} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(38485\) vs.
\(2(157)=314\).
time = 5.31, size = 38486, normalized size = 217.44
method | result | size |
default | \(\text {Expression too large to display}\) | \(38486\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 445 vs.
\(2 (166) = 332\).
time = 4.20, size = 919, normalized size = 5.19 \begin {gather*} \left [-\frac {3 \, {\left ({\left (a^{4} - 8 \, a^{3} b + 18 \, a^{2} b^{2} - 16 \, a b^{3} + 5 \, b^{4}\right )} \cos \left (f x + e\right )^{6} - {\left (a^{4} - 10 \, a^{3} b + 32 \, a^{2} b^{2} - 38 \, a b^{3} + 15 \, b^{4}\right )} \cos \left (f x + e\right )^{4} - a^{2} b^{2} + 6 \, a b^{3} - 5 \, b^{4} - {\left (2 \, a^{3} b - 15 \, a^{2} b^{2} + 28 \, a b^{3} - 15 \, b^{4}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {a} \log \left (-\frac {2 \, {\left ({\left (a - b\right )} \cos \left (f x + e\right )^{2} + 2 \, \sqrt {a} \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) + a + b\right )}}{\cos \left (f x + e\right )^{2} - 1}\right ) - 2 \, {\left (3 \, {\left (a^{4} - 7 \, a^{3} b + 11 \, a^{2} b^{2} - 5 \, a b^{3}\right )} \cos \left (f x + e\right )^{5} + 2 \, {\left (9 \, a^{3} b - 23 \, a^{2} b^{2} + 15 \, a b^{3}\right )} \cos \left (f x + e\right )^{3} + {\left (13 \, a^{2} b^{2} - 15 \, a b^{3}\right )} \cos \left (f x + e\right )\right )} \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{12 \, {\left ({\left (a^{7} - 3 \, a^{6} b + 3 \, a^{5} b^{2} - a^{4} b^{3}\right )} f \cos \left (f x + e\right )^{6} - {\left (a^{7} - 5 \, a^{6} b + 7 \, a^{5} b^{2} - 3 \, a^{4} b^{3}\right )} f \cos \left (f x + e\right )^{4} - {\left (2 \, a^{6} b - 5 \, a^{5} b^{2} + 3 \, a^{4} b^{3}\right )} f \cos \left (f x + e\right )^{2} - {\left (a^{5} b^{2} - a^{4} b^{3}\right )} f\right )}}, \frac {3 \, {\left ({\left (a^{4} - 8 \, a^{3} b + 18 \, a^{2} b^{2} - 16 \, a b^{3} + 5 \, b^{4}\right )} \cos \left (f x + e\right )^{6} - {\left (a^{4} - 10 \, a^{3} b + 32 \, a^{2} b^{2} - 38 \, a b^{3} + 15 \, b^{4}\right )} \cos \left (f x + e\right )^{4} - a^{2} b^{2} + 6 \, a b^{3} - 5 \, b^{4} - {\left (2 \, a^{3} b - 15 \, a^{2} b^{2} + 28 \, a b^{3} - 15 \, b^{4}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {-a} \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right )}{a}\right ) + {\left (3 \, {\left (a^{4} - 7 \, a^{3} b + 11 \, a^{2} b^{2} - 5 \, a b^{3}\right )} \cos \left (f x + e\right )^{5} + 2 \, {\left (9 \, a^{3} b - 23 \, a^{2} b^{2} + 15 \, a b^{3}\right )} \cos \left (f x + e\right )^{3} + {\left (13 \, a^{2} b^{2} - 15 \, a b^{3}\right )} \cos \left (f x + e\right )\right )} \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{6 \, {\left ({\left (a^{7} - 3 \, a^{6} b + 3 \, a^{5} b^{2} - a^{4} b^{3}\right )} f \cos \left (f x + e\right )^{6} - {\left (a^{7} - 5 \, a^{6} b + 7 \, a^{5} b^{2} - 3 \, a^{4} b^{3}\right )} f \cos \left (f x + e\right )^{4} - {\left (2 \, a^{6} b - 5 \, a^{5} b^{2} + 3 \, a^{4} b^{3}\right )} f \cos \left (f x + e\right )^{2} - {\left (a^{5} b^{2} - a^{4} b^{3}\right )} f\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\csc ^{3}{\left (e + f x \right )}}{\left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{\frac {5}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{{\sin \left (e+f\,x\right )}^3\,{\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________